package org.springframework.social.connect;

import cn.sciento.starter.social.core.provider.Provider;

import java.io.Serializable;

public class ConnectionData implements Serializable {
  private String providerId;
  
  private String providerUserId;
  
  private String displayName;
  
  private String profileUrl;
  
  private String imageUrl;
  
  private String accessToken;
  
  private String secret;
  
  private String refreshToken;
  
  private Long expireTime;
  
  private String providerUnionId;
  
  public ConnectionData(String providerId, String providerUserId, String displayName, String profileUrl, String imageUrl, String accessToken, String secret, String refreshToken, Long expireTime, String providerUnionId) {
    this.providerId = Provider.realProviderId(providerId);
    this.providerUserId = providerUserId;
    this.displayName = displayName;
    this.profileUrl = profileUrl;
    this.imageUrl = imageUrl;
    this.accessToken = accessToken;
    this.secret = secret;
    this.refreshToken = refreshToken;
    this.expireTime = expireTime;
    this.providerUnionId = providerUnionId;
  }
  
  public String getProviderId() {
    return this.providerId;
  }
  
  public String getProviderUserId() {
    return this.providerUserId;
  }
  
  public String getDisplayName() {
    return this.displayName;
  }
  
  public String getProfileUrl() {
    return this.profileUrl;
  }
  
  public String getImageUrl() {
    return this.imageUrl;
  }
  
  public String getAccessToken() {
    return this.accessToken;
  }
  
  public String getSecret() {
    return this.secret;
  }
  
  public String getRefreshToken() {
    return this.refreshToken;
  }
  
  public Long getExpireTime() {
    return this.expireTime;
  }
  
  public String getProviderUnionId() {
    return this.providerUnionId;
  }
}
